package com.sh.data.engine.domain.api.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.sh.data.engine.domain.api.model.domain.DataApiCallRecordDomain;
import com.sh.data.engine.domain.api.model.domain.DataApiErrDistributionSummaryDomain;
import com.sh.data.engine.domain.api.model.domain.rest.DataApiCallSummaryDomain;
import com.sh.data.engine.domain.api.model.param.DataApiAddRecordParam;
import com.sh.data.engine.domain.api.model.param.DataApiCallRecordParam;
import com.sh.data.engine.repository.dao.api.entity.DataApiCallRecordEntity;

import java.util.Date;
import java.util.List;

/**
 * @author : fuchen
 * @date : 2022/1/19 15:34
 * <p>API 调用记录
 */
public interface DataApiCallRecordService extends IService<DataApiCallRecordEntity> {

    List<DataApiErrDistributionSummaryDomain> getErrDistributionSummary(Long projectId, String id);

    DataApiCallRecordDomain addRecord(DataApiAddRecordParam param);

    void updateRecordStatus(DataApiCallRecordDomain recordDomain, Integer status);

    void updateRecordBatch(List<DataApiCallRecordDomain> recordDomain);

    IPage<DataApiCallSummaryDomain> listDataApiRecord(DataApiCallRecordParam convert);


    void batchIgnored(List<Long> collect);

    void keepHalfMonthRecord(Date date);
}
